home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1997 December / PC Pro December 1997 CD-Rom coverdisc.iso / dazdec / disk1 / ZDETECT.MS_ / ZDETECT.MS
Encoding:
Text File  |  1994-06-26  |  6.0 KB  |  139 lines

  1. '/************************************************************************
  2. '*                            Copyright (c) 1992 by                      *
  3. '*                         Zenographics, Inc. Irvine CA                  *
  4. '*                             All Rights Reserved                       *
  5. '*************************************************************************
  6. '*
  7. '* $Workfile:   zdetect.mst  $
  8. '*   $Author:   SCOTTC  $
  9. '*     $Date:   05 Jan 1993 11:02:50  $
  10. '* $Revision:   1.0  $
  11. '*   Project:   Setup for SuperPrint/Z-Script
  12. '*
  13. '*      $Log:   S:\setup\mssetup\source\vcs\zdetect.msv  $
  14. '* 
  15. '*    Rev 1.0   05 Jan 1993 11:02:50   SCOTTC
  16. '* Initial revision.
  17. '*
  18. '************************************************************************/
  19.  
  20.  
  21. ' ***** NOTICE *****
  22. ' This include file was derived from Microsoft's MSDETECT.INC.
  23. ' Many of the "wrapper" functions were removed to increase space
  24. ' in the code segment.  If Microsoft changes the MSDETECT.INC file
  25. ' in the future, it may be necessary to edit this file again.
  26. '   Dec-3-1992,SEC
  27. ' ***** NOTICE *****
  28.  
  29. '**************************************************************************
  30. '*************************  Setup Detect API's  ***************************
  31. '**************************************************************************
  32.  
  33. ''detect
  34.  
  35. DECLARE FUNCTION CbGetVersionOfFile LIB "msdetstf.dll" (szFile$, szBuf$, cbBuf%) AS INTEGER
  36. DECLARE FUNCTION LGetVersionNthField LIB "msdetstf.dll" (szVersion$, nField%) AS LONG
  37. DECLARE FUNCTION FGetValidDrivesList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  38. DECLARE FUNCTION FGetLocalHardDrivesList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  39. DECLARE FUNCTION FGetRemovableDrivesList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  40. DECLARE FUNCTION FGetNetworkDrivesList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  41. DECLARE FUNCTION LcbTotalDrive LIB "msdetstf.dll" (nDrive%) AS LONG
  42. DECLARE FUNCTION LcbFreeDrive LIB "msdetstf.dll" (nDrive%) AS LONG
  43. DECLARE FUNCTION FIsValidDrive LIB "msdetstf.dll" (nDrive%) AS INTEGER
  44. DECLARE FUNCTION FIsLocalHardDrive LIB "msdetstf.dll" (nDrive%) AS INTEGER
  45. DECLARE FUNCTION FIsRemoveDrive LIB "msdetstf.dll" (nDrive%) AS INTEGER
  46. DECLARE FUNCTION FIsRemoteDrive LIB "msdetstf.dll" (nDrive%) AS INTEGER
  47. DECLARE FUNCTION FDirExists LIB "msdetstf.dll" (szDir$) AS INTEGER
  48. DECLARE FUNCTION CbGetDateOfFile LIB "msdetstf.dll" (szFile$, szBuf$, cbBuf%) AS INTEGER
  49. DECLARE FUNCTION FDoesIniSectionExist LIB "msdetstf.dll" (szFile$, szSect$) AS INTEGER
  50. DECLARE FUNCTION FDoesIniKeyExist LIB "msdetstf.dll" (szFile$, szSect$, szKey$) AS INTEGER
  51. DECLARE FUNCTION CbGetIniKeyString LIB "msdetstf.dll" (szFile$, szSect$, szKey$, szBuf$, cbBuf%) AS INTEGER
  52. DECLARE FUNCTION WGetDOSMajorVersion LIB "msdetstf.dll" AS INTEGER
  53. DECLARE FUNCTION WGetDOSMinorVersion LIB "msdetstf.dll" AS INTEGER
  54. DECLARE FUNCTION CbGetEnvVariableValue LIB "msdetstf.dll" (szEnvVar$, szBuf$, cbBuf%) AS INTEGER
  55. DECLARE FUNCTION WGetNumWinApps LIB "msdetstf.dll" AS INTEGER
  56. DECLARE FUNCTION FGetParallelPortsList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  57. DECLARE FUNCTION FGetSerialPortsList LIB "msdetstf.dll" (szSymbol$) AS INTEGER
  58. DECLARE FUNCTION FHasMonochromeDisplay LIB "msdetstf.dll" AS INTEGER
  59. DECLARE FUNCTION FHasMouseInstalled LIB "msdetstf.dll" AS INTEGER
  60. DECLARE FUNCTION WGetConfigSmartdrvSize LIB "msdetstf.dll" AS INTEGER
  61. DECLARE FUNCTION WGetConfigRamdriveSize LIB "msdetstf.dll" AS INTEGER
  62. DECLARE FUNCTION WGetConfigNumBuffers LIB "msdetstf.dll" AS INTEGER
  63. DECLARE FUNCTION WGetConfigNumFiles LIB "msdetstf.dll" AS INTEGER
  64. DECLARE FUNCTION WGetConfigLastDrive LIB "msdetstf.dll" AS INTEGER
  65. DECLARE FUNCTION CbFindTargetOnEnvVar LIB "msdetstf.dll" (szFile$, szEnvVar$, szBuf$, cbBuf%) AS INTEGER
  66. DECLARE FUNCTION CbFindFileInTree LIB "msdetstf.dll" (szFile$, szDir$, szBuf$, cbBuf%) AS INTEGER
  67. DECLARE FUNCTION GetTypeFaceNameFromTTF LIB "msdetstf.dll" (szFile$, szBuf$, cbBuf%) AS INTEGER
  68. DECLARE FUNCTION GetExistingFOTFileForTTF LIB "msdetstf.dll" (szFile$, szBuf$, cbBuf%) AS INTEGER
  69. DECLARE FUNCTION FDoesFileExist LIB "msdetstf.dll" (szFileName$, mode%) AS INTEGER
  70.  
  71.  
  72.  
  73. '*************************************************************************
  74. '****************  Detect Basic Wrapper Declarations  ********************
  75. '*************************************************************************
  76.  
  77.  
  78. '' detect
  79. DECLARE FUNCTION GetFreeSpaceForDrive (szDrive$) AS LONG
  80. DECLARE FUNCTION GetVersionOfFile (szFile$) AS STRING
  81. DECLARE FUNCTION GetIniKeyString (szFile$, szSect$, szKey$) AS STRING
  82.  
  83.  
  84. '*************************************************************************
  85. FUNCTION GetFreeSpaceForDrive (szDrive$) STATIC  AS LONG
  86.     GetFreeSpaceForDrive = LcbFreeDrive(ASC(UCASE$(szDrive$)) - ASC("A") + 1)
  87. END FUNCTION
  88.  
  89.  
  90. '*************************************************************************
  91. FUNCTION GetVersionOfFile (szFile$) STATIC  AS STRING
  92. '$ifdef DEBUG
  93.     if FValidFATPath(szFile$) = 0 then
  94.         BadArgErr 1, "GetVersionOfFile", szFile$
  95.     end if
  96. '$endif ''DEBUG
  97.     cb% = 30
  98.     szBuf$ = STRING$(cb%, 32)
  99.     cbRet% = CbGetVersionOfFile(szFile$, szBuf$, cb%)
  100.     GetVersionOfFile = szBuf$
  101. '$ifdef DEBUG
  102.     IF cbRet% >= cb% THEN
  103.         StfApiErr saeOvfl, "GetVersionOfFile", szFile$
  104.         ERROR STFERR
  105.     END IF
  106. '$endif ''DEBUG
  107.     szBuf$ = ""
  108. END FUNCTION
  109.  
  110.  
  111. '*************************************************************************
  112. FUNCTION GetIniKeyString (szFile$, szSect$, szKey$) STATIC  AS STRING
  113. '$ifdef DEBUG
  114.     if FValidIniFile(szFile$) = 0 then
  115.         n% = 1
  116.     elseif szKey$ = "" then
  117.         n% = 3
  118.     else
  119.         n% = 0
  120.     end if
  121.     if n% > 0 then
  122.         BadArgErr n%, "GetIniKeyString", szFile$+", "+szSect$+", "+szKey$
  123.     end if
  124. '$endif ''DEBUG
  125.  
  126.     cb% = 512
  127.     szBuf$ = STRING$(cb%, 32)
  128.     cbRet% = CbGetIniKeyString(szFile$, szSect$, szKey$, szBuf$, cb%)
  129.     GetIniKeyString = szBuf$
  130. '$ifdef DEBUG
  131.     IF cbRet% >= cb% THEN
  132.         StfApiErr saeOvfl, "GetIniKeyString", szFile$+", "+szSect$+", "+szKey$
  133.         ERROR STFERR
  134.     END IF
  135. '$endif ''DEBUG
  136.     szBuf$ = ""
  137. END FUNCTION
  138.  
  139.